package com.berte.Demo02Thread;

public class MyThread extends Thread {
    /*重写了Thread类的run方法*/
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println("haha -->>" + i);
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
